import React, { PureComponent } from 'react'

interface IProps {
  name:string,
  age?:number
}
interface IState {
  message:string
}

export class Index extends PureComponent<IProps,IState> {
  title:string = 'aaaatitle'
  state:IState = {
    message:'hello index01'
  }
  // constructor(props:IProps){
  //   super(props)
  //   this.state = {
  //     message:'hello index01'
  //   }
  // }
  render() {
    return (
      <div>
        <h3>demo index01</h3>
        <div>props-name:{this.props.name}</div>
        <div>state-msg:{this.state.message}-{this.title}</div>
      </div>
    )
  }
}

export default Index